<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath%>">
		<title>学院信息</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">    
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
			<link rel="stylesheet" type="text/css" href="styles.css">
		-->
		<link rel="stylesheet" type="text/css" href="<%=basePath %>scripts/static/h-ui/css/H-ui.min.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>scripts/static/h-ui.admin/css/H-ui.admin.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>scripts/lib/Hui-iconfont/1.0.7/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>scripts/lib/icheck/icheck.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>scripts/static/h-ui.admin/skin/default/skin.css" id="skin" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>scripts/static/h-ui.admin/css/style.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>styles/page.css" />
		<script type="text/javascript" src="<%=basePath %>scripts/jquery-1.9.1.js"></script> 
		<script type="text/javascript" src="<%=basePath %>scripts/lib/layer/2.1/layer.js"></script>
		<script type="text/javascript" src="<%=basePath %>scripts/static/h-ui/js/H-ui.js"></script> 
		<script type="text/javascript" src="<%=basePath %>scripts/static/h-ui.admin/js/H-ui.admin.js"></script>
		<script type="text/javascript" src="<%=basePath %>scripts/jquery.dataTables.min.js"></script>
		<script type="text/javascript" src="<%=basePath %>scripts/dataTables.parse.js"></script>
		<script type="text/javascript">
			function deleteData(id){
				layer.confirm('确认删除？',function(){
					var jsonUrl = "<%=basePath%>exerciceItem/json/deleteExerciceItem/"+id;
					$.ajax({
						url:jsonUrl,
						type:'get',
						dataType:'text',
						success:function(data){
							layer.msg('删除成功');
							setTimeout(function(){
								window.location.reload();
							}, 200);
						},
						error:function(){
							layer.msg('ajax error');
						}
					});
				});
			}
			function exam_content_add(eNo){
				var index = layer.open({
					type:2,
					title:'试题添加',
					content:'<%=basePath%>exam/loadExamContentAdd/'+eNo
				});
				layer.full(index);
			}
			function exam_item_show(id){
				layer_show('试题内容','<%=basePath%>exerciceItem/showExerciceItem/'+id,'400','500');
				
			}
		</script> 
	</head>
	<body>
		<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 
		首页 <span class="c-gray en">&gt;</span> 
		题库管理 <span class="c-gray en">&gt;</span>
		练习题库信息<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
		<i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		
		<span class="r">共有数据：<strong>${pageModel.totalrows }</strong> 条</span>
	</div>
	<div class="mt-20">
		<table id="myTable" class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="25">序号</th>
					<th width="120">题目编号</th>
					<th width="80">所属课程</th>
					<th width="25">难度</th>
					<th width="90">操作</th>
				</tr>
			</thead>
				<tbody>
					<c:forEach items="${pageModel.list }" var="item" varStatus="L">
						<tr class="text-c">
							<td><input type="checkbox" value="${item.itemNo }" id="collegeArray" name="array"></td>
							<td>${L.index+1 }</td>
							<td><a style="text-decoration:none" class="ml-5" onclick="exam_item_show('${item.itemNo}')" href="javascript:;">${item.itemNo }</a></td>
							<td>${item.cource.courceName  }</td>
							<c:choose>
								<c:when test="${item.itemLevel==0 }">
									<td>简单</td>
								</c:when>
								<c:when test="${item.itemLevel==1 }">
									<td>一般</td>
								</c:when>
								<c:when test="${item.itemLevel==2 }">
									<td>困难</td>
								</c:when>
							</c:choose>
							<td class="f-14 td-manage"> 
								<a style="text-decoration:none" class="ml-5" onClick="deleteData('${item.itemNo}')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
		</table>
	</div>
</div>
	</body>
</html>